﻿using System.Diagnostics;

namespace Bing
{
    /// <summary>
    /// Contains properties related to Bing's query-alteration functionality, which alters the search terms of requests when it appears that the search terms may have been intended to be different.
    /// </summary>
    [DebuggerDisplay("SearchTerms:{SearchTerms}, AlterationQueryOverride:{AlterationQueryOverride}, AlteredQuery:{AlteredQuery}")]
    public class Query
    {
        // TODO: Documentation Error: http://msdn.microsoft.com/en-us/library/dd250951.aspx, possibly spelling error in the remarks. microsift offic should be microsoft office
        /// <summary>
        /// Gets or sets the original query with markers added to ensure that the query is processed as sent, as opposed to as altered.
        /// </summary>
        /// <value>Original query with markers added to ensure that the query is processed as sent, as opposed to as altered.</value>
        /// <remarks>For example, if the original query is <b>microsift</b> <b>offic</b>, then AlterationOverrideQuery would be <b>+microsift</b> <b>+offic</b></remarks>
        public string AlterationQueryOverride { get; set; }

        /// <summary>
        /// Gets or sets the original query for a request.
        /// </summary>
        /// <value>The original query for a request.</value>
        public string SearchTerms { get; set; }

        /// <summary>
        /// Gets or sets the query for which results are returned.
        /// </summary>
        /// <value>If alteration is appropriate, this is the query for which results are returned.</value>
        /// <remarks>Though results are returned based on the altered query, you have the opportunity to use AlterationOverrideQuery to re-request results that are based on your original query. </remarks>
        public string AlteredQuery { get; set; }

    }
}
